using System;
using Gtk;
using System.Collections;
using Whitemice.ZOGI;
using Whitemice.ZOGI.GtkWidgets;

namespace Whitemice.Consonance
{
	public partial class ContactQBEDialog : ConsonanceDialog
	{
		ContactDetailForm		qbeForm;
		
		public ContactQBEDialog(Window parent, Gtk.DialogFlags flags) : 
			base("Contact QBE Search", parent, flags)
		{
			this.Build();
			qbeForm = new ContactDetailForm();
			//qbeForm.SearchMode();
			VBox.PackStart(qbeForm, true, true, 2);
		}

		protected virtual void OnClearClicked(
			object _sender, 
			System.EventArgs _e)
		{
			qbeForm.Clear();
		}
		
		public ArrayList Query
		{
			get { return qbeForm.Query; }
		}
		
		public System.EventHandler OnQBEDialogOk;
		public System.EventHandler OnQBEDialogCancel;

		protected virtual void OnCancelClicked(
			object _sender, 
			System.EventArgs _e)
		{
			OnQBEDialogCancel(this, null);
		}

		protected virtual void OnOkClicked(
			object _sender, 
			System.EventArgs _e)
		{
			OnQBEDialogOk(this, null);
		}
	}
}
